<template>
<div class="notice-content">
    <div class="noticelist" v-for="(item,index) in items" :key="index">
        <div class="jiushibox">
            <h1 class="tit">{{ item.title }}</h1>
            <div class="timebox">
                <p>{{ item.time }}</p>
                <!-- <p>{{ item.num }}人已读</p> -->
            </div>
            <div class="noticedesc">
                <p>
                    {{ item.concent }}
                </p>
            </div>
            <div class="noticedesc">
                <img :src="item.img" alt="" mode="widthFix" style="width:2rem;hieght:2rem">
            </div>
            <div v-if="item.replyConcent">
                商家回复：{{ item.replyConcent }}
            </div>
            <div class="removebtn">
                <span @click="recomment(index)">回复</span>
            </div>
        </div>
    </div>
</div>
</template>
<script>

export default {
data() {
return {
    items:[
    ]
};
},
beforeCreate:function(){
//创建前
},
created:function(){
    this.Suk_getlist()
//创建后
},
beforeMount:function(){
//挂载前
},
mounted:function(){
//挂载后
},
beforeUpdate:function(){
//更新前
},
update:function(){
//更新后
},
methods: {
    Suk_getlist() {
      let that = this;
      that.$toast.loading({
        message: "加载中..."
      });
      var Sukdata = {
        // userId: localStorage.getItem("userid"),
        dinId: localStorage.getItem("myshopid"),
        pageSize:200
      };
      console.log(Sukdata);
      that.axios
        .post(that.baseUrl + "/evaluate/queryEvalua", that.Qs.stringify(Sukdata), {
          headers: {
            "Content-Type": "application/x-www-form-urlencoded"
          }
        })
        .then(function(res) {
          if (res.request.status === 200) {
            if (res.data.meta.code == 200) {
                that.items = res.data.data.list
              console.log(res.data);
              that.$toast.clear();
            } else if (res.data.meta.code == 501) {
            }
          }
        });
    },
    recomment(index){
        let that = this
        console.log(that.items[index])
        this.$router.push({
            name:'recomment',
            params:{
                'commentid':that.items[index].evaluateId
            }
        })
    }
}
};
</script>
<style lang="scss" scoped>
.notice-content{
    font-size: 0.3rem;
    background: #f0f0f0;
    padding-bottom: 15rem;

}

.jiushibox{
    width: 90%;
    margin: 0 auto;
    .tit{
        font-weight: 500;
        font-size: 0.5rem
    }
    .timebox{
        display: flex;
        justify-content: space-between;
        border-bottom: 1px solid #f0f0f0;
        p{
            display: inline-block;
            margin-bottom: 0.1rem;
        }
    }
    .noticedesc{
        margin-top: 0.1rem;
        line-height: 0.6rem;
        padding-bottom: 0.1rem;
        border-bottom: 1px solid #f0f0f0;
    }
    .removebtn{
        text-align: right;
        margin-top: 0.1rem;
        span{
            display: inline-block;
            width: 1.8rem;
            height: 0.7rem;
            line-height: 0.7rem;
            color: #fff;
            text-align: center;
            background: #fe9a0f;
            border-radius: 0.1rem
        }
    }
}

.noticelist{
    background: #fff;
    padding-bottom: 0.1rem;
    margin-bottom: 0.3rem;
    // box-shadow: 0rem 0.1rem 0.5rem 0.01rem #9e9e9e
}

</style>
